package com.pinxixi.goods.controller;

import com.pinxixi.api.goods.ItemControllerApi;
import com.pinxixi.framework.domain.goods.Item;
import com.pinxixi.framework.model.response.ListResponseResult;
import com.pinxixi.goods.service.ItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/item")
public class ItemController implements ItemControllerApi {

    @Autowired
    private ItemService itemService;

    @Override
    @GetMapping("/findAll")
    public ListResponseResult<Item> findAllItem() {
        return itemService.findAllItem();
    }
}
